/**
 *Copyright (c) 2024 watereyes
 * safetymanagement is licensed under Mulan PubL v2.
 * You can use this software according to the terms and conditions of the Mulan
 * PubL v2.
 * You may obtain a copy of Mulan PubL v2 at:
 *          http://license.coscl.org.cn/MulanPubL-2.0
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PubL v2 for more details.
 */
package com.koron.scene.mapper;

import com.koron.scene.domain.ProjectStaff;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ProjectStaffMapper {

    int updateByPrimaryKeySelective(ProjectStaff record);


    int insertList(List<ProjectStaff> list);

    List<ProjectStaff> queryList(@Param("projectId") String projectId, @Param("enterpriseId") String enterpriseId,
                                 @Param("historyFlag") Integer historyFlag, @Param("name") String name,
                                 @Param("start") Integer start, @Param("pageSize") Integer pageSize);

    int queryListTotal(@Param("projectId") String projectId, @Param("enterpriseId") String enterpriseId,
                       @Param("historyFlag") Integer historyFlag, @Param("name") String name);

    List<ProjectStaff> managementList(@Param("staffName") String staffName, @Param("enterpriseName") String enterpriseName,
                                      @Param("projectName") String projectName, @Param("start") Integer start,
                                      @Param("pageSize") Integer pageSize,@Param("codes")String codes,@Param("keyword") String keyword);

    int managementListTotal(@Param("staffName") String staffName, @Param("enterpriseName") String enterpriseName,
                            @Param("projectName") String projectName,@Param("codes")String codes,@Param("keyword") String keyword);

    ProjectStaff queryByIdAndIdCardNumber(@Param("idCardNumber") String idCardNumber,@Param("corpCode")String corpCode,
                                           @Param("projectStaffId") String projectStaffId);

    List<ProjectStaff> queryByIdCardNumber(@Param("idCardNumber") String idCardNumber,@Param("corpCode")String corpCode,
                                           @Param("start") Integer start,
                                           @Param("pageSize") Integer pageSize);

    int queryByIdCardNumberTotal(@Param("idCardNumber") String idCardNumber,@Param("corpCode")String corpCode);

    int deleteByProjectAndEnterprise(@Param("projectId") String projectId, @Param("enterpriseId") String enterpriseId);
}